class Statistics {
    private String algorithmName;
    private double executionTime;  // 执行时间 (毫秒)
    private long memoryUsage;      // 内存占用 (KB)

    public Statistics(String algorithmName, double executionTime, long memoryUsage) {
        this.algorithmName = algorithmName;
        this.executionTime = executionTime;
        this.memoryUsage = memoryUsage;
    }

    public String getAlgorithmName() {
        return algorithmName;
    }

    public double getExecutionTime() {
        return executionTime;
    }

    public long getMemoryUsage() {
        return memoryUsage;
    }

    @Override
    public String toString() {
        return algorithmName + ": " +
               String.format("执行时间: %.2f 毫秒, 内存占用: %d KB", executionTime, memoryUsage);
    }
}
